<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for...in</title>
</head>
<body>
<script>
    var obj={
        name: "smyhvae",
        age: 26,
        gender: "男",
        address: "shenzhen"
    };
    for (var n in obj){
        console.log("属性名："+n);
        console.log("属性值"+obj[n])
    }
</script>
</body>
</html>